﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Glue_FrameWork.ViewModels.Param;
using MvvmLib;

namespace MathFlowLib.FeatureJudge
{
    /// <summary>
    /// 判断类型
    /// </summary>
    public enum E_Bin
    {
        OK, NG
    }

    /// <summary>
    /// 与上限比较类型
    /// </summary>
    public enum E_CompareMaxType
    {
        小于, 小于等于
    }

    /// <summary>
    /// 与下限比较类型
    /// </summary>
    public enum E_CompareMinType
    {
        大于, 大于等于
    }

    /// <summary>
    /// 特征判断标准
    /// </summary>
    [Serializable]
    public class Vm_Feature_Std : GParam
    {
        /// <summary>
        /// 特征名称
        /// </summary>
        public string FeatureName
        {
            get { return _FeatureName; }
            set
            {
                if (_FeatureName != value)
                {
                    _FeatureName = value;
                    this.OnPropertyChanged("FeatureName");
                }
            }
        }
        private string _FeatureName;

        /// <summary>
        /// 标准上限
        /// </summary>
        public double? Max
        {
            get { return _Max; }
            set
            {
                if (_Max != value)
                {
                    _Max = value;
                    this.OnPropertyChanged("Max");
                }
            }
        }
        private double? _Max;

        /// <summary>
        /// 与上限比较类型
        /// </summary>
        public E_CompareMaxType CompareMaxType
        {
            get { return _CompareMaxType; }
            set
            {
                if (_CompareMaxType != value)
                {
                    _CompareMaxType = value;
                    this.OnPropertyChanged("CompareMaxType");
                }
            }
        }
        private E_CompareMaxType _CompareMaxType;

        /// <summary>
        /// 标准下限
        /// </summary>
        public double? Min
        {
            get { return _Min; }
            set
            {
                if (_Min != value)
                {
                    _Min = value;
                    this.OnPropertyChanged("Min");
                }
            }
        }
        private double? _Min;

        /// <summary>
        /// 与下限比较类型
        /// </summary>
        public E_CompareMinType CompareMinType
        {
            get { return _CompareMinType; }
            set
            {
                if (_CompareMinType != value)
                {
                    _CompareMinType = value;
                    this.OnPropertyChanged("CompareMinType");
                }
            }
        }
        private E_CompareMinType _CompareMinType;

        /// <summary>
        /// 符合条件的级别
        /// </summary>
        public E_Bin Bin
        {
            get { return _Bin; }
            set
            {
                if (_Bin != value)
                {
                    _Bin = value;
                    this.OnPropertyChanged("Bin");
                }
            }
        }
        private E_Bin _Bin;

        /// <summary>
        /// 默认级别
        /// </summary>
        public E_Bin DefaultBin
        {
            get { return _DefaultBin; }
            set
            {
                if (_DefaultBin != value)
                {
                    _DefaultBin = value;
                    this.OnPropertyChanged("DefaultBin");
                }
            }
        }
        private E_Bin _DefaultBin;

    }
}
